app_family.controller("controller_assessresult", function($scope, $rootScope, httpRequest) {
	$rootScope.$broadcast('currentModule', 'assessresult');
	
	$scope.result = '';
	data_sessionStorage = JSON.parse(sessionStorage.getItem('data_sessionStorage'));
	
	var answer_code = data_sessionStorage.assInfo.ass_answer.firstassess1 + ','
		 			   + data_sessionStorage.assInfo.ass_answer.firstassess2 + ','
		 			   + data_sessionStorage.assInfo.ass_answer.firstassess3 + ','
		 			   + data_sessionStorage.assInfo.ass_answer.firstassess4 + ','
		 			   + data_sessionStorage.assInfo.ass_answer.secondassess;
	
	httpRequest.saveOlderAssess({
		account : data_sessionStorage.assInfo.ass_olderInfo.account, // 被评估者账号
		answer_code : answer_code, // 答案Code
		mobile : data_sessionStorage.familyInfo.phone// 家属手机号
	}, function (data) {
		if (data.success === true) {
			// 日常生活
			$scope.liveActivityRisk_levelName = data.obj.liveActivityRisk_levelName;
			// 评估总结果分级
			$scope.risk_levelName = data.obj.risk_levelName;
			// 感知觉与沟通等级
			$scope.sensoryCommunicationRisk_levelName = data.obj.sensoryCommunicationRisk_levelName;
			// 社会参与等级
			$scope.societyParticipationRisk_levelName = data.obj.societyParticipationRisk_levelName;
			// 精神
			$scope.spiritStatusRisk_levelName = data.obj.spiritStatusRisk_levelName;
		} else if (data.success === false) {
			$.dialog.showToast({msgTxt : data.msg});
		}
	});
	
});